<demo>
常规使用
</demo>
<template>
  <div>
    <Cascader popoverHeight="200px"
              v-model:selected="selected"
              v-model:dataSource="dataSource" />
  </div>
</template>

<script lang="ts">
import { ref } from "vue";
import Cascader from "../../lib/cascader/Cascader.vue";
export default {
  setup() {
    let selected = ref([]);
    let dataSource = ref([
      {
        name: "广东",
        children: [
          {
            name: "深圳",
            children: [
              {
                name: "龙岗",
              },
              { name: "宝安" },
            ],
          },
          {
            name: "广州",
            children: [
              {
                name: "海珠",
              },
              { name: "天河" },
            ],
          },
        ],
      },
      {
        name: "浙江",
        children: [
          {
            name: "杭州",
            children: [
              {
                name: "上城",
              },
              { name: "下城" },
            ],
          },
        ],
      },
      {
        name: "福建",
        children: [
          {
            name: "厦门",
            children: [
              {
                name: "思明",
              },
              { name: "海沧" },
            ],
          },
          {
            name: "泉州",
            children: [
              {
                name: "安溪",
              },
              { name: "丰泽" },
            ],
          },
        ],
      },
    ]);
    return {
      dataSource,
      selected,
    };
  },
  components: {
    Cascader,
  },
};
</script>

<style></style>
